home *** CD-ROM | disk | FTP | other *** search
- Path: apollo36.eis.enac.dgac.fr!mathey
- From: mathey@apollo36.eis.enac.dgac.fr (mathey)
- Newsgroups: comp.lang.c++
- Subject: Q: friend templates ...
- Date: 12 Feb 1996 11:20:43 GMT
- Distribution: world
- Message-ID: <4fn7qb$i7n@news.cict.fr>
- NNTP-Posting-Host: apollo36.eis.enac.dgac.fr
- Keywords: friend templates
-
- Hello to everyone contributing to this execellent newsgroup,
-
- Here's the little problem I'm currently facing :
-
- I have 2 template classes :
-
- template <class T,class W> class Container {
-
- ...
-
- };
-
- template <class T> class Pattern {
- ...
-
- };
-
- What i want to do is to declare that all possible instances with respect
- to the second formal template parameter W of class Container are friends of
- class Pattern (e.g. Container<float,_everything_> is friend of Pattern<float>
- and so on ...)
-
- I've tried something like this :
-
- template <class T> class Pattern {
-
- template <class W> friend class Container<T,W>;
-
- }
-
- but it obviously doesn't work
-
- I guess this question has already been posted but I can't seem to find any trace of it so i would greatly appreciate any hint / solution ...
-
- Thanks in advance .
-
- Cyril.
-
- mathey@eis.enac.dgac.fr
-
-
-